
/**
 * 导航栏
 * @param props 
 * @returns 
 */
export default function HeadTitle(
	{
		title,
		url
	}: {
		title: string;
		url?: string
	}) {
	return <>
		<div className='v'>
			<div className='back' onClick={() => {
				if (url) {
					window.location.href = url;
				} else {
					window.history.back();
				}
			}}>
				<img className='img' src='/images/back.png' />
			</div>
			<div className='t'>
				<span className='title'>{title}</span>
			</div>
			<style jsx>{`
.v{
display: flex;
flex-direction: row;
padding: 1rem;
}
.back{
display: flex;
flex-direction: row;
justify-content: center;
width: 1rem;
 height: 1rem;
flex-grow: 0;
}
.img{
width: 0.5rem;
 height: 0.875rem;
margin-top: 0.4rem;
}
.t{
display: flex;
flex-direction: row;
justify-content: center;
flex-grow: 1;
}
.title{
font-size: 1.125rem;
text-align: center;
color: #FFFFFF;
}
`}</style>
		</div>
	</>;
}
